﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_Account_AddNew : System.Web.UI.Page
{

    private void LoadPage()
    {
        String strPage = "";
        try
        {
            strPage = Request.Params["Pro"].ToString().Trim();
        }
        catch
        {
            strPage = "";
        }

     //   int group = Convert.ToInt32(Session["group"].ToString());
        Boolean bBool = false;
      //  bBool = QpWeb.clsDataTable.GetPhanQuyen("ADD", group, strPage);
       // if (!bBool)
       // {
        //    Response.Redirect(Constant.ROOT_PATH + "admin/Account/Err.aspx");
      //  }

        if (strPage != "")
        {
            strPage = strPage + "\\";
        }
        strPage = strPage + "AddNew.ascx";
        this.psLoadCtrl.Controls.Add(this.LoadControl("Modules\\" + strPage));

    }


    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["userName"] == null)
        {
           // Response.Redirect(Constant.ROOT_PATH + "Login.aspx");
        }
        LoadPage();
        if (!this.IsPostBack) {
           
        }
    }
    protected override void InitializeCulture()
    {
        string culture = "vi-VN";//Mặc định ban đầu là ngôn ngữ Việt Nam
        if (Session["Lang"] != null || Session["Lang"] + "" != "")
        {
            culture = Session["Lang"].ToString();
            //Nếu là Tiếng Anh
            if (culture == "2")
            {
                culture = "en-Us";
            }
            else if (culture == "3")
            {
                culture = "zh-CN";
            }
            else
            {
                culture = "vi-Vn";
            }
        }
        if (Request.Params["LangId"] != null)
        {
            string strLangId = Request.Params["LangId"].ToString();
            if (strLangId == "2")
            {
                Session["Lang"] = "2";
                culture = "en-Us";
            }
            else if (strLangId == "3")
            {
                Session["Lang"] = "3";
                culture = "zh-CN";
            }
            else
            {
                Session["Lang"] = "1";
                culture = "vi-Vn";
            }
        }
        Page.UICulture = culture;
        Page.Culture = culture;
        if (culture != "vi-Vn")
        {
            System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(culture);
            System.Threading.Thread.CurrentThread.CurrentCulture = ci;
            System.Threading.Thread.CurrentThread.CurrentUICulture = ci;
        }
        base.InitializeCulture();
    }
}